<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %><div class="content-wrapper">
    <div class="aircraft-detail-card">
        <!-- 头部 -->
        <div class="detail-header">
            <div class="aircraft-icon">
                <i class="fas fa-plane"></i>
            </div>
            <h2>${aircraft.aircraftId}</h2>
            <p>飞机详细信息管理</p>
        </div>

        <!-- 编辑表单 -->
        <form class="detail-form" action="UpdateAircraftServlet" method="post">
            <input type="hidden" name="aircraftId" value="${aircraft.aircraftId}">

            <div class="form-grid">
                <!-- 左侧信息 -->
                <div class="form-column">
                    <!-- 飞机型号 -->
                    <div class="input-group">
                        <label class="input-label">
                            <i class="fas fa-tag"></i>
                            飞机型号
                        </label>
                        <input type="text" 
                               class="form-input"
                               name="model" 
                               value="${aircraft.model}"
                               required>
                    </div>

                    <!-- 最大座位数 -->
                    <div class="input-group">
                        <label class="input-label">
                            <i class="fas fa-chair"></i>
                            最大座位
                        </label>
                        <input type="number" 
                               class="form-input"
                               name="maxSeats" 
                               value="${aircraft.maxSeats}"
                               min="1" 
                               max="1000" 
                               required>
                    </div>
                </div>

                <!-- 右侧信息 -->
                <div class="form-column">
                    <!-- 当前状态 -->
                    <div class="input-group">
                        <label class="input-label">
                            <i class="fas fa-heartbeat"></i>
                            当前状态
                        </label>
                        <div class="custom-select">
                            <select class="status-select" name="currentStatus" required>
                                <option value="可用" ${aircraft.currentStatus == '可用' ? 'selected' : ''}>可用</option>
                                <option value="维修中" ${aircraft.currentStatus == '维修中' ? 'selected' : ''}>维修中</option>
                                <option value="停飞" ${aircraft.currentStatus == '停飞' ? 'selected' : ''}>停飞</option>
                            </select>
                            <div class="select-arrow"></div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 操作按钮 -->
            <div class="action-buttons">
                <button type="button" class="btn-cancel" onclick="history.back()">
                    <i class="fas fa-times"></i>
                    取消
                </button>
                <button type="submit" class="btn-save">
                    <i class="fas fa-save"></i>
                    保存更改
                </button>
            </div>
        </form>
    </div>
</div>

<style>
body {
    background: linear-gradient(rgba(255, 255, 255, 0.95), 
                url(img/login_background.png) center/cover fixed);
    min-height: 100vh;
}

/* 调整现有卡片样式 */
.aircraft-detail-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* 优化表单元素可见性 */
.form-input, .status-select {
    background: rgba(255, 255, 255, 0.9);
}
/* 基础样式 */
.aircraft-detail-card {
    max-width: 800px;
    margin: 2rem auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* 头部样式 */
.detail-header {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    padding: 2.5rem;
    color: white;
    text-align: center;
}

.aircraft-icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aircraft-icon i {
    font-size: 2.5rem;
}

.detail-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.detail-header p {
    opacity: 0.9;
}

/* 表单布局 */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2.5rem;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* 输入组样式 */
.input-group {
    margin-bottom: 1.8rem;
}

.input-label {
    display: flex;
    align-items: center;
    color: #64748b;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.input-label i {
    margin-right: 0.8rem;
    font-size: 1.2rem;
}

.form-input {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* 状态选择器 */
.status-selector {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.status-option {
    flex: 1;
    min-width: 120px;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.status-option.active {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
}

.status-indicator {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin: 0 auto 0.5rem;
}

.status-indicator.可用 {
    background: #10b981;
}

.status-indicator.维修中 {
    background: #f59e0b;
}

.status-indicator.停飞 {
    background: #ef4444;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem 2.5rem;
    border-top: 1px solid #f1f5f9;
}

.btn-cancel, .btn-save {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: #f8fafc;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.btn-cancel:hover {
    background: #f1f5f9;
}

.btn-save {
    background: #6366f1;
    color: white;
    border: none;
}

.btn-save:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-save i, .btn-cancel i {
    margin-right: 0.6rem;
}
/* 自定义下拉框样式 */
.custom-select {
    position: relative;
    width: 100%;
}

.status-select {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border: 2px solid #bae6fd;
    border-radius: 8px;
    background: white;
    color: #0c4a6e;
    font-size: 1rem;
    appearance: none;
    transition: all 0.3s ease;
}

.status-select:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

/* 自定义下拉箭头 */
.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-left: 2px solid #38bdf8;
    border-bottom: 2px solid #38bdf8;
    transform: rotate(-45deg);
    pointer-events: none;
    transition: transform 0.2s ease;
}

.status-select:focus ~ .select-arrow {
    transform: rotate(135deg) translateY(25%);
}

/* 下拉选项样式 */
.status-select option {
    padding: 0.8rem;
    background: white;
    color: #0c4a6e;
}

.status-select option:hover {
    background: #e0f2fe !important;
}

.status-select option:checked {
    background: #bae6fd;
    font-weight: 500;
}
</style>